package com.SouthernWall_404.Age_Capitalism.common.Server.commands;

import com.mojang.brigadier.CommandDispatcher;
import com.mojang.brigadier.context.CommandContext;
import com.mojang.brigadier.exceptions.CommandSyntaxException;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.commands.Commands;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.entity.player.Player;

public class OpenMerchantCommand {
    public static void register(CommandDispatcher<CommandSourceStack> commandDispatcher) {
        commandDispatcher.register(Commands.literal("age_capitalism")
                .then(Commands.literal("character")
                        .then(Commands.literal("edit").executes(OpenMerchantCommand::handler))));

    }

    private static int handler(CommandContext<CommandSourceStack> context) throws CommandSyntaxException
    {
        Player player=context.getSource().getPlayer();

        if(player instanceof ServerPlayer serverPlayer)
        {
//            Store store=new Store();
//            store.startTrading(player);
//            NetworkHooks.openScreen(serverPlayer,new ModMerchantMenuProvider(0,player.getInventory()));
        }


        return 0;
    }

}
